﻿<%@ Page Title="" Language="C#" MasterPageFile="~/OrderManagement.master" AutoEventWireup="true"
    CodeBehind="Followup.aspx.cs" Inherits="SCFHS.Views.Followup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NastedHead" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#Followup").addClass("createOrderMenuactive");
            $(".orderToSearch").keydown(function (e) {
                if (e.keyCode == "13")
                    $(".btnSubmit").click();
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NastedBody" runat="server">
    <div id="FollowUp">
        <asp:HiddenField ID="hdfOrderNo" runat="server" />
        <asp:Label Text=" " runat="server" ID="lblMessage" />
        <asp:MultiView ActiveViewIndex="0" runat="server" ID="mView">
            <asp:View runat="server" ID="vGetOrder">
                <div id="SelectOrder">
                    <asp:Label Text="أدخل رقم الطلب للإستمرار" runat="server" CssClass="tooltip" />
                    <div class="row OrderInfo">
                        <ul class="title">
                            <li>رقم الطلب</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:TextBox runat="server" ID="txtOrderNumberToSearch" Font-Size="18" TabIndex="0"
                                    CssClass="orderToSearch ltrNumbers" ValidationGroup="Search" /><asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator1" ErrorMessage="يجب إدخال رقم الطلب أولا" ControlToValidate="txtOrderNumberToSearch"
                                        runat="server" Text="*" ForeColor="Red" ValidationGroup="Search" /></li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:Button Text="متابعة الطلب" runat="server" ID="btnNextToOrder" Font-Size="16"
                                    OnClick="btnNextToOrder_Click" TabIndex="1" CssClass="btnSubmit button" ValidationGroup="Search" />
                            </li>
                        </ul>
                    </div>
                </div>
            </asp:View>
            <asp:View runat="server" ID="vFollowup">
                <div>
                    <div id="followHeader" class="row">
                        <ul class="title">
                            <li style="width: 90px;">صـــاحب الطلب</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:TextBox runat="server" ID="txtPersonName" Enabled="false" Font-Size="14" /></li>
                        </ul>
                        <ul class="title">
                            <li>رقــم التصنيف</li>
                        </ul>
                        <ul class="data">
                            <li>
                                <asp:TextBox runat="server" ID="txtClassificationNumber" Enabled="false" Font-Size="14"
                                    CssClass="ltrNumbers" Width="120" /></li>
                        </ul>
                    </div>
                    <div class="followupBrowser">
                        <asp:Repeater runat="server" ID="rptFollowupdCatalog">
                            <ItemTemplate>
                                <div class="followupCatalogRow">
                                    <asp:Panel runat="server" Visible='<%# Eval("Type").ToString()=="Instruction" ? false : true%>'>
                                        <div id="OrderFollowUp" class="Box">
                                            <div class="ContentTitle">
                                                متابعة
                                            </div>
                                            <div class="followupContent">
                                                <div class="followupRow">
                                                    <ul class="title">
                                                        <li style="width: 90px">الجهة</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:Label runat="server" ID="txtFollowUpAuth" Width="280" Text='<%# Eval("FollowUpAuthority") %>'></asp:Label></li>
                                                    </ul>
                                                    <ul class="title">
                                                        <li>رقم المعاملة</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:Label runat="server" ID="txtSquNumber" Width="80" Text='<%# Eval("FollowUpSequenceNumber") %>'></asp:Label></li>
                                                    </ul>
                                                </div>
                                                <div class="followupRow followupDisc">
                                                    <ul class="title">
                                                        <li style="width: 90px">التوجية</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:TextBox runat="server" ID="txtFollowupDiscrip" TextMode="MultiLine" Enabled="false"
                                                                Text='<%# Eval("FollowUpDiscription") %>' Width="430" /></li>
                                                    </ul>
                                                </div>
                                                <div class="followupRow">
                                                    <ul class="title">
                                                        <li style="width: 90px">الإسم</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:Label runat="server" ID="txtFollowerName" Width="280" Text='<%# Eval("FollowerName") %>'></asp:Label></li>
                                                    </ul>
                                                    <ul class="title">
                                                        <li style="width: 60px">التاريخ</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:Label runat="server" ID="txtFollowupDate" Width="80" Text='<%# Eval("FollowUpDate", "{0:d}") %>' /></li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                    <asp:Panel ID="Panel1" runat="server" Visible='<%# Eval("Type").ToString()=="Instruction" ? true : false%>'>
                                        <div id="OrderInstructions" class="Box">
                                            <div class="ContentTitle">
                                                توجية
                                            </div>
                                            <div class="InstructionContent">
                                                <div id="AuthorityOf" class="row">
                                                    <ul class="title">
                                                        <li>صاحب الصلاحية</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:Label runat="server" Width="250px" Font-Size="12" Text='<%# Eval("AuthorityOf") %>' /></li>
                                                    </ul>
                                                    <ul class="title">
                                                        <li>التاريخ</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:Label runat="server" Text='<%# Eval("SubmitTimestamp","{0:d}") %>'></asp:Label></li>
                                                    </ul>
                                                </div>
                                                <center>
                                                    <div class="authContainer">
                                                    </div>
                                                </center>
                                                <div id="Instruction" class="row" style="height: 70px;">
                                                    <ul class="title">
                                                        <li>التوجية</li>
                                                    </ul>
                                                    <ul class="data">
                                                        <li>
                                                            <asp:TextBox runat="server" TextMode="MultiLine" ID="txtInstruction" Width="430"
                                                                Text='<%# Eval("Instruction") %>' Enabled="false"></asp:TextBox>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="AddFollow">
                        <asp:MultiView ActiveViewIndex="0" runat="server" ID="mFollowup">
                            <asp:View runat="server" ID="vAddFollowup">
                                <div id="OrderFollowUp" class="Box radius-Bottom">
                                    <div class="ContentTitle">
                                        إضافة متابعة
                                    </div>
                                    <div class="followupContent">
                                        <div class="followupRow">
                                            <ul class="title">
                                                <li style="width: 90px">الجهة</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:TextBox runat="server" ID="txtFollowUpAuth" Width="250" /><asp:RequiredFieldValidator
                                                        ErrorMessage="يجب إدخال إسم الجهة أولا" ControlToValidate="txtFollowUpAuth" runat="server"
                                                        Text="*" ForeColor="Red" ValidationGroup="addFollowup" /></li>
                                            </ul>
                                            <ul class="title">
                                                <li>رقم المعاملة</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:TextBox runat="server" ID="txtSquNumber" Width="80" /></li>
                                            </ul>
                                        </div>
                                        <div class="followupRow followupDisc">
                                            <ul class="title">
                                                <li style="width: 90px">التوجية</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:TextBox runat="server" ID="txtFollowupDiscrip" TextMode="MultiLine" /><asp:RequiredFieldValidator
                                                        ErrorMessage="يجب إضافة نص المتابعة" ControlToValidate="txtFollowupDiscrip" runat="server"
                                                        Text="*" ForeColor="Red" ValidationGroup="addFollowup" /></li>
                                            </ul>
                                        </div>
                                        <div class="followupRow">
                                            <ul class="title">
                                                <li style="width: 90px">الإسم</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:TextBox runat="server" ID="txtFollowerName" Width="250" /></li>
                                            </ul>
                                            <ul class="title">
                                                <li style="width: 60px">التاريخ</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:TextBox runat="server" ID="txtFollowupDate" Width="80" CssClass="date" /></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="ProgressContent">
                                    <asp:Button Text="تحديث الطلب" runat="server" ID="btnAddFollowup" OnClick="btnAddFollowup_Click"
                                        Font-Size="16" ValidationGroup="addFollowup" />
                                </div>
                            </asp:View>
                            <asp:View runat="server" ID="vAddInstruction">
                                <div id="OrderInstructions" class="Box radius-Bottom">
                                    <div class="ContentTitle">
                                        إضافة توجية
                                    </div>
                                    <div id="AuthorityOf" class="row">
                                        <ul class="title">
                                            <li>صاحب الصلاحية</li>
                                        </ul>
                                        <ul class="data">
                                            <li>
                                                <asp:TextBox runat="server" ID="txtAuthorityOf" Width="250px" Font-Size="12" ValidationGroup="OrderInstructions" /><asp:RequiredFieldValidator
                                                    ID="RequiredFieldValidator3" ErrorMessage="يجب تحديد صاحب الصلاحية اولا" ControlToValidate="txtAuthorityOf"
                                                    ValidationGroup="OrderInstructions" runat="server" ForeColor="Red" Text="*" /></li>
                                        </ul>
                                        <ul class="title">
                                            <li>التاريخ</li>
                                        </ul>
                                        <ul class="data">
                                            <li>
                                                <asp:TextBox runat="server" ID="txtForwardDate" CssClass="date" Width="80" /></li>
                                        </ul>
                                    </div>
                                    <center>
                                        <div class="authContainer">
                                        </div>
                                    </center>
                                    <div id="Instruction" class="row" style="height: 70px;">
                                        <ul class="title">
                                            <li>التوجية</li>
                                        </ul>
                                        <ul class="data">
                                            <li>
                                                <asp:TextBox runat="server" TextMode="MultiLine" ID="txtInstruction" ValidationGroup="OrderInstructions"
                                                    Width="460" /><asp:RequiredFieldValidator ID="RequiredFieldValidator2" ErrorMessage="يجب إضافة نص التوجيه أولا"
                                                        ControlToValidate="txtInstruction" runat="server" ForeColor="Red" ValidationGroup="OrderInstructions"
                                                        Text="*" />
                                            </li>
                                        </ul>
                                    </div>
                                    <div class="row">
                                        <ul class="title">
                                            <li style="width: 94px;">رفع سجل المتابعة</li>
                                        </ul>
                                        <ul class="data">
                                            <li>
                                                <asp:FileUpload ID="fuFollowupDoc" runat="server" Height="25" Width="375" /><asp:RequiredFieldValidator
                                                    ErrorMessage="يجب إختيار الملف اولا" ControlToValidate="fuFollowupDoc" Text="*"
                                                    ForeColor="Red" runat="server" ValidationGroup="FollowDocUpload" /></li>
                                        </ul>
                                        <ul class="data">
                                            <li>
                                                <asp:Button Text="رفع" runat="server" CssClass="button" ID="btnFollowupDoc" ValidationGroup="FollowDocUpload"
                                                    OnClick="btnFollowupDoc_Click" /></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="ProgressContent">
                                    <asp:Button Text="تحديث الطلب" runat="server" ID="btnUpdateOrder" OnClick="btnUpdateOrder_Click"
                                        Font-Size="16" />
                                    <asp:Button Text="حفظ و إغلاق الطلب" runat="server" ID="btnSaveAndClose" OnClick="btnSaveAndClose_Click"
                                        Font-Size="16" />
                                </div>
                            </asp:View>
                        </asp:MultiView>
                    </div>
                </div>
            </asp:View>
        </asp:MultiView>
    </div>
</asp:Content>
